package me.zhengjie.domain;

import lombok.RequiredArgsConstructor;
import me.zhengjie.repository.InventoryRepository;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

@Component
@RequiredArgsConstructor
public class InventoryService {

    private final InventoryRepository inventoryRepository;

    @Transactional(rollbackFor = Exception.class)
    public void deleteByPalletId(int inventoryId) {
        inventoryRepository.deleteInventoryByPalletId(inventoryId);
    }
}
